/**
 * @author Excelent
 */
    
    function verifyUsername(){
        
        if($("#user_name").val().length >= 4)
        {
        
        $.ajax({
            type: 'POST',
            url: 'http://localhost/clouli/login/verifyregister/check_username',
            data: 'name='+$("#user_name").val(),
            success: function(msg){
                if(msg==1)
                {
                    $("#usr_verify").css({ "background-image": "url('../images/no.png')" });
 

                }
                else
                {
                    $("#usr_verify").css({ "background-image": "url('../images/yes.png')" });
                    
                    
                }
            }
        });
         
        }
        else 
        {
            $("#usr_verify").css({ "background-image": "none" });
        }
    }

    function verifyEmail(){
        
        if($("#email_address").val().length >= 4)
        {
        
        $.ajax({
            type: 'POST',
            url: 'http://localhost/clouli/login/verifyregister/check_email',
            data: 'email='+$("#email_address").val(),
            success: function(msg){
                if(msg==1)
                {
                    $("#email_verify").css({ "background-image": "url('../images/no.png')" });
 

                }
                else
                {
                    $("#email_verify").css({ "background-image": "url('../images/yes.png')" });
                    
                    
                }
            }
        });
         
        }
        else 
        {
            $("#email_verify").css({ "background-image": "none" });
        }
    }    


function verifyPassword(){
        

        if($("#password").val().length <=5 && $("#password").val().length >0)
        {
            $("#password_verify").css({ "background-image": "url('../images/no.png')" });
            $("#con_password").attr("disabled","disabled");
            
        }

        if ($("#password").val().length >5){
            $("#password_verify").css({ "background-image": "url('../images/yes.png')" });
            $('#con_password').removeAttr('disabled');


            }

        else
        {
            $("#password_verify").css({ "background-image": "none" });
        }
        
    }



    function verifyConPassword(){
        
        if($("#con_password").val().length <=6)
        {
            if($("#con_password").val()!=$("#password").val())
            {
                $("#confrimpwd_verify").css({ "background-image": "url('../images/no.png')" }); 
                
            }
            else{
                $("#confrimpwd_verify").css({ "background-image": "url('../images/yes.png')" }); 
               
            }
        }
    }
function isValidEmailAddress(emailAddress) {
        var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
        return pattern.test(emailAddress);
    }